import request from '@/utils/request'

// 查询重大应急救援任务列表
export function listEmergency(query) {
  return request({
    url: '/emergency/emergency/list',
    method: 'get',
    params: query
  })
}

// 查询重大应急救援任务详细
export function getEmergency(id) {
  return request({
    url: '/emergency/emergency/' + id,
    method: 'get'
  })
}

// 新增重大应急救援任务
export function addEmergency(data) {
  return request({
    url: '/emergency/emergency',
    method: 'post',
    data: data
  })
}

// 修改重大应急救援任务
export function updateEmergency(data) {
  return request({
    url: '/add/add/update5',
    method: 'put',
    data: data
  })
}

// 删除重大应急救援任务
export function delEmergency(id) {
  return request({
    url: '/emergency/emergency/' + id,
    method: 'delete'
  })
}

// 输入账号，获取人名
export function getFirefighterIdCard(idCardNumber) {
  return request({
    url: '/add/add/firefighterIdCard',
    method: 'post',
    data: {
      idCardNumber: idCardNumber
    }
  })
}
// 批量添加
export function addEmergencyList(data) {
  return request({
    url: '/add/add/emergency',
    method: 'post',
    data: data
  })
}
